package com.le.tester.javaThink.fifth.chapter14_StreamingProgramming;

import java.io.*;

/**
 * 描述：基础文件输出
 */
public class BasicFileOutput {
    static String file = "E:\\L.info\\L.Application\\L.Tester\\src\\main\\java\\com\\le\\tester\\java8\\chapter14_StreamingProgramming\\BasicFileOutput.java";

    public static void main(String[] args) {
        try (BufferedReader in = new BufferedReader(
                new StringReader(BufferedInputFile.read("E:\\L.info\\L.Application\\L.Tester\\src\\main\\java\\com\\le\\tester\\java8\\chapter14_StreamingProgramming\\BasicFileOutput.java"))
        ); PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file)))) {
            in.lines().forEach(out::println);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        System.out.println(BufferedInputFile.read(file));
    }

}
